<template>
  <div>
    <Table :columns="columns" :data="data" size="small" border >
		<template slot-scope="{ row, index }" slot="id">
		  {{index + 1}}
		</template>
		<template slot-scope="{ row, index }" slot="status">
		  <span v-if="row.status == 0">待审核</span>
		  <span v-else-if="row.status == 1">已通过</span>
		  <span v-else="row.status == 2">未通过</span>
		</template>
	</Table>
  </div>
</template>
<script>
export default {
  name: 'RecentPayment',
  props: {
    data: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      columns: [
        { title: '序号', slot: 'id', align: 'center', width: 60 },
        { title: '项目名称', key: 'project_name', align: 'center', width: 250 },
        { title: '部门', key: 'dept_name', align: 'center', width: 100 },
        { title: '填报人', key: 'user_name', align: 'center', width: 100 },
        { title: '开始时间', key: 'start_time', align: 'center', width: 120 },
        { title: '结束时间', key: 'end_time', align: 'center', width: 120 },
        { title: '工时(小时)', key: 'time', align: 'center', width: 100 },
        { title: '状态', slot: 'status', align: 'center', width: 100 },
        { title: '备注', key: 'content', minWidth: 150 }
      ]
    };
  }
};
</script> 